package com.qiaoya.service;

import org.springframework.security.core.userdetails.UserDetailsService;

import com.qiaoya.model.entity.User;

import java.util.Optional;

/**
 * @author Xiaoyue Xiao
 */
public interface UserService extends UserDetailsService {

    Optional<User> getUserById(String ID);

    boolean saveUser(User user);

    boolean modifyUserOnPasswordById(User user);

    boolean deleteUserById(String ID);
    
    boolean deleteTokenByUsername(String username);
    
    public boolean deleteTokenByToken(String accessToken);
}
